#ifndef DependencyPipe2O_H
#define DependencyPipe2O_H
#include"DependencyPipe2OGrandChildren.h"

class DependencyPipe2O : public DependencyPipe2OGrandChildren{
protected:
	virtual void addExtendedFeatures(DependencyInstance *instance, FeatureVector *fv);

	virtual void writeExtendedFeatures(DependencyInstance *instance, ObjectWriter &out);

	void addSiblingFeatures(DependencyInstance *instance, int ch1, int ch2, bool isST, FeatureVector *fv);
	
	void addTripFeatures(DependencyInstance *instance, int par, int ch1, int ch2, FeatureVector *fv);


public:

	DependencyPipe2O(ParserOptions *options);

	virtual ~DependencyPipe2O();

	void fillFeatureVectors(DependencyInstance* instance, vector<vector<vector<double> > > &probs, 
		vector<vector<vector<double> > > &probs_trips, vector<vector<vector<double> > > &probs_sibs,
		vector<vector<vector<double> > > &probs_grands, vector<vector<double> > &probs_gchs,
		vector<vector<vector<vector<double> > > > &nt_probs, Parameters* params);

	DependencyInstance* readInstance(ObjectReader &in, int length, vector<vector<vector<double> > > &probs,
		vector<vector<vector<double> > > &probs_trips, vector<vector<vector<double> > > &probs_sibs,
		vector<vector<vector<double> > > &probs_grands, vector<vector<double> > &probs_gchs, 
		vector<vector<vector<vector<double> > > > &nt_probs, Parameters* params);
};
#endif
